﻿@using Fyp.Models;

@{
    ViewBag.Title = "Search";

    Layout = "~/Shared/_layoutPage.cshtml";
    var PageTitle = "Search Meeting";
    
    var data = (List<MeetingScheduler>)ViewData["data"];
}

@section title
{
    @PageTitle
}

<style>
table, td, th
{
border:1px solid green;
padding:2px;
}
th
{
background-color:green;
color:white;
padding:2px;
}
</style>

@using (Html.BeginForm("SearchMeeting", "SearchMeeting", FormMethod.Post, new { enctype = "multipart/form-data" }))
{  
     <strong>
            <div id="content" style="margin-left: 98px;margin-bottom: -1px;">
                 <h2 style="text-align: center;">Meeting Scheduler List</h2>
             </div>
    </strong>

     <table class = "table" style=" margin-left: 116px; margin-right: 139px;">
     <thead>
           <tr>
               <th class="table">Meeting Title</th>
               <th class="table">Meeting Type</th>
               <th class="table">Meeting Location</th>
               <th class="table">Meeting Date</th>
           </tr>
       </thead>
       <tbody> 
      @foreach (var row in data)
       {
           <tr>
                   <td class="table">@row.MeetingTitle</td>
                   <td class="table">@row.MeetingType</td>
                   <td class="table">@row.MeetingLocation</td>
                   <td class="table">@row.MeetingDate.Value.ToString("dd/MM/yyyy")</td>
            </tr>
       }
        </tbody>
    </table>
}  